package com.ding.dailyup.repository;

import com.ding.dailyup.model.SysNotice;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
@CacheConfig(cacheNames = "sys:notice:" + SysNotice.serialVersionUID)
public interface SystemNoticeRepository extends JpaRepository<SysNotice, Long> {

	@Cacheable(key = "#p0")
	Optional<List<SysNotice>> findByStatus(int i);
}
